'use strict';
const mongoose = require('mongoose');
const promise = require('bluebird');

const db = () => {
  mongoose.Promise = promise;
  mongoose.connect('mongodb://127.0.0.1:27017/family_books');
  return mongoose.connection;
}

module.exports = db;